package com.eistert.spring.ioc;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class IocBeanLifeCicleMain {

	public static void main(String[] args) {
		// 加载spring上下文
		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(MainConfig.class);

		Car car = context.getBean("car", Car.class);
		System.out.println(car.getName());
	}
}
